import request from '@/config/axios'

export interface CoalTypeMgrVO {
  id: number
  coalName: string
  coalType: number
  coalCode: number
}

// 查询煤种管理列表
export const getCoalTypeMgrPage = async (params: CoalTypeMgrPageReqVO) => {
  return await request.get({ url: `/queue/coal-type-mgr/page`, params })
}

// 查询煤种管理详情
export const getCoalTypeMgr = async (id: number) => {
  return await request.get({ url: `/queue/coal-type-mgr/get?id=` + id })
}

// 新增煤种管理
export const createCoalTypeMgr = async (data: CoalTypeMgrVO) => {
  return await request.post({ url: `/queue/coal-type-mgr/create`, data })
}

// 修改煤种管理
export const updateCoalTypeMgr = async (data: CoalTypeMgrVO) => {
  return await request.put({ url: `/queue/coal-type-mgr/update`, data })
}

// 删除煤种管理
export const deleteCoalTypeMgr = async (id: number) => {
  return await request.delete({ url: `/queue/coal-type-mgr/delete?id=` + id })
}

// 导出煤种管理 Excel
export const exportCoalTypeMgr = async (params) => {
  return await request.download({ url: `/queue/coal-type-mgr/export-excel`, params })
}

// 查询精简小煤种
export const getCoalSubTypeSimpleList = async () => {
  return await request.get({ url: `/queue/coal-type-mgr/get-simple-subtype-list` })
}
